﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace MediaServer
{
    public interface IDIDLSerializable
    {
        /// <summary>
        /// Attempts to recursively find an object by given ID.
        /// </summary>
        /// <param name="id">ID of the object.</param>
        /// <returns>Returns first object matching the ID or null if not found.</returns>
        IDIDLSerializable Find(string Id);

        /// <summary>
        /// Creates DIDL-Lite XML representation of current object and first-level children.
        /// </summary>
        List<IDIDLSerializable> Browse();

        /// <summary>
        /// Creates DIDL-Lite XML representation of current object.
        /// </summary>
        XmlElement SingleXML(XmlDocument doc);

        /// <summary>
        /// Returns true if object matches given SearchCriteria.
        /// </summary>
        bool Matches(string SearchCriteria);
    }
}
